package com.freesky.biz.activity.controller;

import com.freesky.biz.activity.domain.TSmsCode;
import com.freesky.biz.activity.service.ISmsCodeService;
import com.freesky.common.core.controller.BaseController;
import com.freesky.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/activity/smscode")
public class SmsCodeController extends BaseController {

    @Autowired
    private ISmsCodeService smsCodeService;

    /**
     * 短信发送列表
     */
    @PreAuthorize("@ss.hasPermi('activity:smscode:list')")
    @GetMapping("/list")
    public TableDataInfo list(TSmsCode smsCode) {
        startPage();
        List<TSmsCode> list = smsCodeService.findList(smsCode);
        return getDataTable(list);
    }
}
